package com.atguigu.ssyx.acl;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 杨林
 * @create 2023-07-11 11:03 星期二
 * description:测试stream流使用
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class UserInfo {

    //姓名
    private String name;

    //年龄
    private Integer age;

    //性别
    private String sex;

    //薪资
    private Double salary;

    //住址
    private String address;

    //主管
    private String employee;

    @Override
    public String toString() {
        return "UserInfo{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                ", salary=" + salary +
                ", address='" + address + '\'' +
                ", employee='" + employee + '\'' +
                '}';
    }

    public static List<UserInfo> build(){
        UserInfo userInfo1 = new UserInfo("张三",18,"男",8888.88,"汉中","志刚");
        UserInfo userInfo2 = new UserInfo("李四",28,"男",6666.88,"宁强","李四");
        UserInfo userInfo3 = new UserInfo("王五",19,"女",6666.66,"略阳","李四");
        UserInfo userInfo4 = new UserInfo("赵六",29,"男",5555.55,"勉县","志刚");
        UserInfo userInfo5 = new UserInfo("田七",30,"男",7777.88,"城固","志刚");
        UserInfo userInfo6 = new UserInfo("志刚",31,"女",9999.99,"洋县","天");
        List<UserInfo> list = new ArrayList<>();
        list.add(userInfo1);
        list.add(userInfo2);
        list.add(userInfo3);
        list.add(userInfo4);
        list.add(userInfo5);
        list.add(userInfo6);
        return list;
    }
}
